<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 创建对象 -->
     <script>
        let as1={};
        as1.name="张三";
        as1.age=19;
        console.log(as1);

        var as2={
            name:"李四",
            age:20,
        }
        console.log(as2.name);

        function animal(name,age,gender,area){
            this.name=name;
            this.age=age;
            this.gender=gender;
            this.area=area;
            this.eat=function(){
                console.log("吃饭");
            }
        }

        let as3=new animal("王五",22,"男","北京");
        console.log(as3);
     </script>
</body>
</html>